<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" media="screen" href="../../css/bootstrap.min.css">
</head>
<body>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
	<form class="form-horizontal" onsubmit="return false" id="form">
		<fieldset>
			<div class='form-group'>
				<label class='col-md-2 control-label'>fid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='fid' type='text' name='fid' id='fid' data-bv-notempty='true' data-bv-notempty-message='fid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>paymentid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='paymentid' type='text' name='paymentid' id='paymentid' data-bv-notempty='true' data-bv-notempty-message='paymentid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>paymentdetailid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='paymentdetailid' type='text' name='paymentdetailid' id='paymentdetailid' data-bv-notempty='true' data-bv-notempty-message='paymentdetailid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>recipeno</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='recipeno' type='text' name='recipeno' id='recipeno' data-bv-notempty='true' data-bv-notempty-message='recipeno 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>tradeno</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='tradeno' type='text' name='tradeno' id='tradeno' data-bv-notempty='true' data-bv-notempty-message='tradeno 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>groupid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='groupid' type='text' name='groupid' id='groupid' data-bv-notempty='true' data-bv-notempty-message='groupid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>recipetdate</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='recipetdate' type='text' name='recipetdate' id='recipetdate' data-bv-notempty='true' data-bv-notempty-message='recipetdate 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>recipettype</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='recipettype' type='text' name='recipettype' id='recipettype' data-bv-notempty='true' data-bv-notempty-message='recipettype 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>itemno</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='itemno' type='text' name='itemno' id='itemno' data-bv-notempty='true' data-bv-notempty-message='itemno 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>itemtype</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='itemtype' type='text' name='itemtype' id='itemtype' data-bv-notempty='true' data-bv-notempty-message='itemtype 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>itemname</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='itemname' type='text' name='itemname' id='itemname' data-bv-notempty='true' data-bv-notempty-message='itemname 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>feelevel</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='feelevel' type='text' name='feelevel' id='feelevel' data-bv-notempty='true' data-bv-notempty-message='feelevel 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>unitprice</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='unitprice' type='text' name='unitprice' id='unitprice' data-bv-notempty='true' data-bv-notempty-message='unitprice 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>count</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='count' type='text' name='count' id='count' data-bv-notempty='true' data-bv-notempty-message='count 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>fee</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='fee' type='text' name='fee' id='fee' data-bv-notempty='true' data-bv-notempty-message='fee 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>specificatio</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='specificatio' type='text' name='specificatio' id='specificatio' data-bv-notempty='true' data-bv-notempty-message='specificatio 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>unit</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='unit' type='text' name='unit' id='unit' data-bv-notempty='true' data-bv-notempty-message='unit 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>usages</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='usages' type='text' name='usages' id='usages' data-bv-notempty='true' data-bv-notempty-message='usages 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>dose</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='dose' type='text' name='dose' id='dose' data-bv-notempty='true' data-bv-notempty-message='dose 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>doseage</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='doseage' type='text' name='doseage' id='doseage' data-bv-notempty='true' data-bv-notempty-message='doseage 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>package</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='package' type='text' name='package' id='package' data-bv-notempty='true' data-bv-notempty-message='package 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>days</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='days' type='text' name='days' id='days' data-bv-notempty='true' data-bv-notempty-message='days 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>patientid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='patientid' type='text' name='patientid' id='patientid' data-bv-notempty='true' data-bv-notempty-message='patientid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>times</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='times' type='text' name='times' id='times' data-bv-notempty='true' data-bv-notempty-message='times 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>hostcode</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='hostcode' type='text' name='hostcode' id='hostcode' data-bv-notempty='true' data-bv-notempty-message='hostcode 不能为空'>
				</div>
			</div>


			<div class="form-actions">
				<div class="row" align="center">
					<div class="col-md-12">
					    <button class="btn btn-primary" onclick="location.href='appPaymentDetailList.html'">返回</button>
						<button class="btn btn-primary" type="submit" onclick="add()">
							<i class="fa fa-save"></i> 保存
						</button>
					</div>
				</div>
			</div>

		</fieldset>
	</form>
</div>
	<script type="text/javascript" src="../../js/libs/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="../../js/jq.js"></script>
	<script type="text/javascript" src="../../js/plugin/bootstrapvalidator/bootstrapValidator.min.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript">
		layui.use(['layer','laydate'], function(){
		    var layer = layui.layer;
		});
		
		function add() {
			$('#form').bootstrapValidator();
			var bootstrapValidator = $("#form").data('bootstrapValidator');
			bootstrapValidator.validate();
		    if(!bootstrapValidator.isValid()){
			   return;
		    }
		    
		    var formdata = $("#form").serializeObject();

			$.ajax({
				type : 'post',
				url : '/appPaymentDetails',
				contentType: "application/json; charset=utf-8",  
				data : JSON.stringify(formdata),
				success : function(data) {
					layer.msg("添加成功", {shift: -1, time: 1000}, function(){
                        location.href = "appPaymentDetailList.html";
                    });
				}
			});
		}
		
	</script>
</body>
</html>
